{template 'header'}
<link rel="stylesheet" href="{CSS_URL}register.css"/>
<!--当前位置-->
<div class="location layout960">
	当前位置: <a href="{SITE_URL}">首页</a>&nbsp; » &nbsp; <a href="{$DT[file_register]}">会员注册</a>
</div>
<!--当前位置 end-->
<!--主体部分-->
<div class="reg-block layout960">
	<div class="reg-title fn-clear">
		<span class="current">1 填写账户信息</span>
		<span>2 注册成功</span>
	</div>
	<div class="reg-con">
		<form action="{url('member/register')}" method="post" id="pub-form">
			<input name="action" type="hidden" id="action" value="{Crypt::action('register')}"/>
			<input name="forward" type="hidden" value="{$forward}"/>
		<h2>账户信息</h2>
		<table class="reg-table">
			<tr >
				<td class="left" width="110px"><label for="username">会员名</label><span>*</span></td>
				<td width="230px"><input id="username" name="post[username]"  type="text" maxlength="255" {if $username} value="{$username}" readonly{/if}/>
				</td>
				<td width="470px">
					<div class="tips "  id="tusername" style="display:none;">
						{$MOD[minusername]}-{$MOD[maxusername]}个字符，只能使用小写字母(a-z)、数字(0-9)、下划线(_)、中划线(-)，且以字母或数字开头和结尾。
						<span></span>
					</div>
					<span  id="dusername">&nbsp;</span>
				</td>
			</tr>
			{if $MOD[passport] && $passport}
			<tr>
				<td class="left" width="110px"><label for="passport">通行证用户名</label><span>*</span></td>
				<td width="230px"><input  name="post[passport]" id="passport"  type="text"  {if $passport} value="{$passport}" readonly{/if}/></td>
				<td width="470px">
					<div class="tips "  id="tpassport" style="display:none;">
						支持中文名，可用于论坛等系统用户名<br/>如果不填写，则和会员名一致
						<span></span>
					</div>
					<span id="dpassport" ></span>
				</td>
			</tr>
			{/if}
			<tr >
				<td class="left"><label for="main-email">电子邮箱</label><span>*</span></td>
				<td width="230px"><input type="text" name="post[email]" id="email"  {if $email} value="{$email}" readonly{/if}/></td>
				<td>
					<div class="tips " id="temail" style="display:none;">
						{if $MOD[checkuser] == 2}
						系统设置了邮件验证注册，请确保当前的邮件地址真实有效<br/>
						{/if}
						请使用常用常用邮箱(E-mail)地址，地址不会被公开且可用于登录网站
                        <span></span>
					</div>
					<span id="demail" ></span>
				</td>
			</tr>
			{if $could_emailcode}
			<tr>
				<td class="left"><label for="main-emailcode">邮件验证码</label><span>*</span></td>
				<td width="230px"><input type="text"  name="post[emailcode]" id="emailcode" />
					<input type="button" value="立即发送" id="send_code" onclick="SendCode();"/>
				</td>
				<td>
					<div class="tips" id="temailcode" style="display:none;">
							点击“立即发送”按钮，系统将会发送一组6位数字验证码至您填写的电子邮箱，请接收邮件获取验证码后，填写在左侧的输入框内，继续完成注册
					    <span></span>
                    </div>
					<span id="demailcode" ></span>&nbsp;
				</td>
			</tr>
			<tr id="sendok" style="display:none;">
				<td >&nbsp;</td>
				<td width="230px" id="dsendok">&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			{/if}
			<tr >
				<td class="left"><label for="password">登陆密码</label><span>*</span></td>
				<td width="230px"><input type="password" name="post[password]" id="password"
				  class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[6,20]',invalidMessage:'登录密码长度应在6-20之间',missingMessage:'请填写登录密码'" {if $password}value="{$password}" readonly{/if}/></td>
				<td>
					<div class="tips " id="tpassword" style="display:none;">
						{$MOD[minpassword]}-{$MOD[maxpassword]}个字符，区分大小写，推荐使用数字、字母和特殊符号组合。
                        <span></span>
					</div>
					<span id="dpassword"></span>
				</td>
			</tr>
			<tr>
				<td class="left"><label for="cpassword">重新输入密码</label><span>*</span></td>
				<td width="230px"><input type="password" size="30" name="post[cpassword]" id="cpassword"  {if $password} value="{$password}"	readonly{/if}/></td>
				<td>
					<div class="tips" id="tcpassword" style="display:none;">
						请再输入一遍上面填写的密码。
                        <span></span>
					</div>
					<span id="dcpassword" class="cred"></span>&nbsp;
				</td>
			</tr>
			{if $MOD[question_register]}
			<tr>
				<td class="left"><label for="main-tanswer">验证问题</label><span>*</span></td>
				<td width="230px">{template 'question', 'chip'}</td>
				<td>
					<div class="tips" id="tanswer" style="display:none;">
						请把问题的答案填写到输入框中
                        <span></span>
					</div>
					<span id="danswer" ></span>
				</td>
			</tr>
			{/if}
			{if $MOD[captcha_register]}
			<tr>
				<td class="left"><label for="main-tanswer">验证码</label><span>*</span></td>
				<td width="230px">{template 'captcha', 'chip'}</td>
				<td>
					<div class="tips" id="tcaptcha" style="display:none;">
						请把图形中的字符填写到输入框中<br/>如果看不清楚，请点击图片刷新
                        <span></span>
					</div>
					<span id="dcaptcha" ></span>
				</td>
			</tr>
			{/if}
			<tr>
				<td class="left">&nbsp;</td>
				<td><button id="main-submit"  type="submit">同意以下服务条款，提交</button></td>
				<td>&nbsp;</td>
			</tr>
		</table>
	</div>
	{template 'agreement', $module}
	<a class="reg-print" href="?print=1" target="_blank">可打印版本</a>
</div>
<!--主体部分 end-->
<script type="text/javascript">
	seajs.use(['$','easyui','easyui-css'], function ($) {
		$("#pub-form").form();
		$('#username').validatebox({
			required:true,
			validType:['length[4,20]','username','remote["{ajaxUrl('common/member', 'job=username&moduleid='.$moduleid)}","value","会员登录名已经被注册"]'],
			missingMessage:'请填写会员名'
		});
		$('#cpassword').validatebox({
			required:true,
			validType:'is_same["value","#password","两次输入的密码应该相同"]',
			missingMessage:'请重复输入密码'
		});
	})
</script>
<!--
$('#email').validatebox({
			required:true,
			validType:['email','remote["ajax.php?action=member&job=email&moduleid={$moduleid}","value","邮件地址已经存在"]'],
			missingMessage:'请填写邮箱'
		});
-->
{template 'footer'}